<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>쪽지보내기</title>
<style type="text/css">
body{
	background-color: #666666;
	font-size: 12px;
	font-family: 100%/1.4 나눔고딕;
	color:#FFFFFF;
	margin: 10px;
	padding: 5px;
}
</style>
<script src="../js/jquery-1.8.3.js"></script>
<script type="text/javascript">
$(function(){
	$("#msgBtn").click(function(){
		if($("[name=contents]").val()==""){
			alert("내용을 입력해 주세요!!");
			return false;
		}
		$("#msgWriteForm").submit();
	});
	$("#msgCancel").click(function(){
		window.close();
	});
});
</script>
</head>
<body>
<form method="get" action="../sns.do" id="msgWriteForm">
<input type="hidden" name="mode" value="writeMsg">
<input type="hidden" name="to.uId" value="${param.uid }">
<input type="hidden" name="to.nickname" value="${param.nick }">
<input type="hidden" name="from.uId" value="${sessionScope.mvo.uId }">
<input type="hidden" name="from.nickname" value="${sessionScope.mvo.nickname }">
<table>
<tr>
	<td>to. </td>
	<td><b>${param.nick }</b></td>
</tr>
<tr>
	<td>제목</td>
	<td><input type="text" name="title"></td>
</tr>
<tr>
	<td>내용</td>
	<td><textarea name="contents" rows="10" cols="20"></textarea></td>
</tr>
<tr align="right">
	<td colspan="2"><input type="button" id="msgBtn" value="보내기">
	<input type="button" id="msgCancel" value="취소"></td>
</tr>
</table>

</form>
</body>
</html>